﻿using Microsoft.Extensions.DependencyInjection;
using System;
using System.Windows;
using WPFPractice.Services;
using WPFPractice.Windows;

namespace WPFPractice
{
	/// <summary>
	/// App.xaml 的交互逻辑
	/// </summary>
	public partial class App : Application
    {
        /// <summary>
        /// 服务提供者
        /// </summary>
        public static IServiceProvider ServiceProvider { get; private set; } //放在此处便于全局使用;

		public App()
        {
            IServiceCollection services = new ServiceCollection();
            services.AddSingleton<ITextService, TextService>();
            services.AddTransient<WinDITester>();

            ServiceProvider = services.BuildServiceProvider(); ;
        }
    }
}
